package com.atguigu.upp.mapper;

import com.atguigu.upp.bean.TaskTagRule;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by Smexy on 2022/10/13
 */
public interface TaskTagRuleMapper
{
    @Select("select t1.* ,t2.tag_name subTagValue " +
        "        from " +
        "       (select * from task_tag_rule where task_id = #{taskId} ) t1  " +
        "       JOIN `tag_info` t2" +
        "       ON t1.`sub_tag_id` = t2.`id`")
    List<TaskTagRule> getTaskTagRulesByTaskId(Integer taskId);
}
